<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@ include file="../common/htmlHeader.jsp"%>
<title>用户显示</title>
</head>
<body>
	<form id="form" action="">
		<input class="form-control" name="search" type="text"> 
		<input class="btn btn-primary" name="submit" type="button" onclick="search()" value="提交">
	</form>
	<button onclick="search()" method="post" accept-charset="utf-8">提交</button>
	<TABLE class="table">
		<TR>
			<td>当前页：${pageUtil.pageIndex}</td>
			<td>每页多少条：${pageUtil.pageSize}</td>
			<td>总页数：${pageUtil.totalPages}</td>
			<td>总条数：${pageUtil.totalRow}</td>
			<td>跳转到：</td>
			<td>下一页：${pageUtil.next}</td>
			<td>上一页：${pageUtil.prev}</td>
		</TR>
		<c:forEach items="${pageUtil.plist}" var="user">
			<TR>
				<td>用户名：${user.name}</td>
				<td>登录地点：${user.region}</td>
			</TR>
		</c:forEach>
	</TABLE>
	<TABLE class="table">
		<TR>用户名：<em id="username">fsadfsa</em></TR>
		<TR>用户年龄：<em id="userage">fasdfa</em></TR>
	</TABLE>
	<button onclick="test()">测试</button>
	
	<%@ include file="../common/htmlFooter.jsp"%>
	<script>
	$(function(){
		
	});
	function search(){
		$.ajax({
			contentType:"application/json;charse=UTF-8",
			type:"get",
			dataType:"json",
			url:"search",
			//data:$("form").serialize(),
			success : function(data) {
				$("#username").html(data.user.name);
				$("#userage").html(data.user.age);
			}
		});
	};
	</script>
	
</body>
</html>